The present invention, in some embodiments thereof, relates to creating a robust persistent memory based distributed-journal file system and, more specifically, but not exclusively, to creating a robust persistent memory based distributed-journal file system by allocating a self-journal record to each of the files in the file system.
Data storage is one of the major building blocks of modern technology as everything is about data. One of the challenges every data storage system, product and/or platform is facing is the need to provide a robust crash immune data management environment while maintaining high access rates and data store/retrieval performance. Crash immunity is essential in order to verify the consistency of a data storage system to assure data integrity and/or avoid data loss in the event of an improper unmounting of the data storage system as result of, for example, a system crash, a system hang and/or a power loss which may occur during one or more operations to the data storage system.
One of the widely used techniques for implementing a robust data management system is a journal based file system in which every file operation such as, for example, file creation, removal, modification, truncate, merge, split and/or link is logged in a dedicated record—a journal. Following an improper unmount sequence of the file system, the journal may be analyzed to determine which of one or more file operations that took place during the improper unmount sequence have completed successfully and which of the file operation(s) have not completed.
Analyzing the journal allows the file system to undo file operation(s) which did not complete during the improper unmount sequence and restore the file system to the initial state in which it was prior to initiation of the failed file operation(s). The data involving the failed file operation(s) may be lost but the integrity of the file system is maintained.
Journaling file systems however may present a performance penalty in modern multi-threaded processors, since the journal needs to be kept constantly synchronized, forcing every state-modifying file and/or directory operation to be logged in the journal, in the order it is executed. This scenario may make the journal logging itself a bottleneck in the data storage path. The performance penalty may have been acceptable while working with legacy mass storage devices, for example, magnetic hard drives and/or solid state drives and/or arrays, however the rapidly increasing performance of near-memory speed storage devices may require other solutions to address a robust file system which allows for high data access rates and/or performance.